{% extends "abview/templates/base.html" %}
{% load static %}
{% block title %}{{system}}灰度设置列表{% endblock %}

{% block content_title %}{{system}}灰度设置列表{% endblock %}




{% block content_body %}
<form id="uid-upstream">
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">新增</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="txt_system">环境</label>
                        <input type="text" name="txt_env_name" class="form-control" id="txt_env_name" value="{{ env_name }}" readonly/>
                    </div>
                    <div class="form-group">
                        <label for="txt_system">系统名</label>
                        <input type="text" name="txt_system" class="form-control" id="txt_system" value="{{ system }}" readonly/>
                    </div>
                    <div class="form-group">
                        <label for="txt_uid">Uid</label>
                        {% if devices %}
                            <select id="txt_uid" class="form-control">
                                {% for device in devices %}
                                    <option>{{ device.sn }}</option>
                                {% endfor %}
                            </select>
                        {% else %}
                            <input type="text" name="txt_uid" class="form-control" id="txt_uid" placeholder="Uid">

                        {% endif %}

                    </div>
                    <div class="form-group">
                        <label for="txt_upstream">Upstream</label>
                        <input  type="text" name="txt_upstream" class="form-control" id="txt_upstream" placeholder="Upstream" pattern="^http://">
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
                    <button type="button" id="btn_submit" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
                </div>
            </div>
        </div>
    </div>
</form>
<div id="toolbar" class="btn-group">
            <button id="btn_add" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
            </button>

            <button id="btn_delete" type="button" class="btn btn-default">
                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
            </button>
        </div>
<div class="panel-body">
    <div class="row">
        <div class="col-lg-12">
            <table id="tb_departments" class="table table-bordered">
            </table>
        </div>
    </div>
</div>


    <script src="{% static 'abview/js/bootstrap-table-routes-init.js' %}"></script>

{% endblock %}